import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home/home'
import TransferEntry from '@/views/Transfer/transferEntry'
import TransferConfirm from '@/views/Transfer/transferConfirm'
import TransferResult from '@/views/Transfer/transferResult'
import RMMain from '@/views/RoleManagement/rm-main'
import RMModify from '@/views/RoleManagement/rm-modify'
import Confirm from '@/views/comment/confirm'
import RMDetail from '@/views/RoleManagement/rm-detail'
import RMEntry from '@/views/RoleManagement/rm-entry'
import RMManagement from '@/views/RoleManagement/rm-management'
import Result from '@/views/comment/result'

import UMMain from '@/views/UserManagement/um-main'
import UMQUERYLIST from '@/views/UserManagement/um-queryList'
import UMModify from '@/views/UserManagement/um-modify'
import UMDetail from '@/views/UserManagement/um-detail'
import SCMain from '@/views/SelfCenter/sc_main'
import SCList from '@/views/SelfCenter/sc_list'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/TransferEntry',
      name: 'TransferEntry',
      component: TransferEntry
    },
    {
      path: '/TransferConfirm',
      name: 'TransferConfirm',
      component: TransferConfirm
    },
    {
      path: '/TransferResult',
      name: 'TransferResult',
      component: TransferResult
    },
    {
      path: '/roleManagement',
      name: 'roleManagement',
      component: RMMain,
      children: [
        {
          path: 'modify',
          name: 'modify',
          component: RMModify
        },
        {
          path: 'confirm',
          component: Confirm,
          name: 'confirm'
        },
        {
          path: 'detail',
          component: RMDetail,
          name: 'detail'
        },
        {
          path: 'entry',
          component: RMEntry,
          name: 'entry'
        },
        {
          path: 'management',
          component: RMManagement,
          name: 'management'
        },
        {
          path: 'result',
          component: Result,
          name: 'result'
        }
      ]
    },
    {
      path: '/userMain',
      name: 'userMain',
      component: UMMain,
      children: [
        {
          path: 'queryList',
          name: 'queryList',
          component: UMQUERYLIST
        },
        {
          path: 'um-modify',
          name: 'um-modify',
          component: UMModify
        },
        {
          path: 'um-detail',
          name: 'um-detail',
          component: UMDetail
        }
      ]
    },
    {
      path: '/selfCenter',
      name: 'selfCenter',
      component: SCMain,
      children: [
        {
          path: 'list/:name',
          name: 'sc_list',
          component: SCList,
          props: true
        }
      ]
    }
  ]
})
